// ============================== 导入依赖 ============================== //

import CORE from '@root/【CORE】'

const text = '<h1>大好河山，天高地宽</h1>'
const src = 'https://element.eleme.cn/static/theme-index-blue.c38b733.png'
const img = `<p><img src="${src}" style="max-width:100%;"/></p>`
const TEXT = `<div class="rich-text" style="word-break: break-all">${text}${img}</div>`

const IMG1 = 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
const IMG2 = 'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg'
const IMG3 = 'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg'
const IMG4 = 'https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg'
const IMG5 = 'https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg'
const IMG6 = 'https://fuss10.elemecdn.com/9/bb/e27858e973f5d7d3904835f46abbdjpeg.jpeg'
const IMG7 = 'https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg'
const IMG8 = 'https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg'
const IMG9 = 'https://fuss10.elemecdn.com/2/11/6535bcfb26e4c79b48ddde44f4b6fjpeg.jpeg'

const VIDEO = 'https://player.alicdn.com/video/editor.mp4'

// ============================== 导出模拟数据 ============================== //

export default {
  /**
   * 用户
   */
  USER: [
    // —————————————————————————————— 张三 —————————————————————————————— //

    {
      id: '3',
      tenantNo: 1,

      // 基本信息
      name: '张三',
      phone: '13333333333',
      idType: 1,
      idNo: '330109200303033332',
      birth: '2003-03-03',
      gender: 1,
      age: 18,
      eduList: [2003, 2006],
      province: 330000,
      city: 330100,
      area: 330109,
      addr: '盈丰街道',

      // 账号信息
      photo: IMG1,
      account: 'zhangsan',
      password: 'zhangsan',
      status: 1,
      activeTime: CORE.timeNum(CORE.now(-86400 * 10)),
      expireTime: CORE.timeNum(CORE.now(-86400 * 10)),
      roleId: '010101',
      roleName: '历史角色一',
      rolesIdList: ['010101', '020202', '030303'],
      rolesNameList: ['角色一', '角色二', '角色三'],

      // 工作信息
      organIdsList: ['111', '111111'],
      organId: '111111',
      organName: '研发中心',
      organsIdList: [],
      organsNameList: [],
      beginDate: CORE.timeNum(CORE.today(-10)),
      endDate: CORE.timeNum(CORE.today(10)),
      salary: 3003003.03,
      link: 'https://qq.com',
      email: 'zhangsan@qq.com',
      vehicle: '浙A33333',
      selfSign: TEXT,

      // 收藏信息
      fileList: [IMG1, IMG2, IMG3, IMG4, IMG5, IMG6, IMG7, IMG8, IMG9],
      imageList: [IMG1, IMG2, IMG3, IMG4, IMG5, IMG6, IMG7, IMG8, IMG9],
      audioList: [VIDEO, VIDEO, VIDEO],
      videoList: [VIDEO, VIDEO, VIDEO],

      createTime: 0,
      updateTime: 0,
    },

    // —————————————————————————————— 李四 —————————————————————————————— //

    {
      id: '2',
      tenantNo: 1,

      // 基本信息
      name: '李四',
      phone: '14444444444',
      idType: 1,
      idNo: '330109200404044444',
      birth: '2004-04-04',
      gender: 2,
      age: 17,
      eduList: [2004, 2008],
      province: 330000,
      city: 330100,
      area: 330109,
      addr: '宁围街道',

      // 账号信息
      photo: IMG2,
      account: 'lisi',
      password: 'lisilisi',
      status: 2,
      activeTime: CORE.timeNum(CORE.now(-86400 * 20)),
      expireTime: CORE.timeNum(CORE.now(-86400 * 20)),
      roleId: '020202',
      roleName: '历史角色二',
      rolesIdList: ['020202', '030303'],
      rolesNameList: ['角色二', '角色三'],

      // 工作信息
      organIdsList: ['111', '111222'],
      organId: '111222',
      organName: '销售中心',
      organsIdList: [],
      organsNameList: [],
      beginDate: CORE.timeNum(CORE.today(-20)),
      endDate: CORE.timeNum(CORE.today(20)),
      salary: 1234567.89,
      link: 'https://baidu.com',
      email: 'lisi@qq.com',
      vehicle: '浙A44444',
      selfSign: TEXT,

      // 收藏信息
      fileList: [IMG1, IMG2],
      imageList: [IMG1, IMG2],
      audioList: [VIDEO],
      videoList: [VIDEO],

      createTime: 0,
      updateTime: 0,
    },

    // —————————————————————————————— 王五 —————————————————————————————— //

    {
      id: '1',
      tenantNo: 1,

      // 基本信息
      name: '王五',
      phone: '15555555555',
      idType: 1,
      idNo: '330109200505055556',
      birth: '2005-05-05',
      gender: 1,
      age: 16,
      eduList: [2005, 2010],
      province: 330000,
      city: 330100,
      area: 330109,
      addr: '新街街道',

      // 账号信息
      photo: IMG1,
      account: 'wangwu',
      password: 'wangwu',
      status: 1,
      activeTime: CORE.timeNum(CORE.now(-86400 * 30)),
      expireTime: CORE.timeNum(CORE.now(-86400 * 30)),
      roleId: '030303',
      roleName: '历史角色三',
      rolesIdList: ['030303'],
      rolesNameList: ['角色三'],

      // 工作信息
      organIdsList: ['111', '111111', '111111333'],
      organId: '111111333',
      organName: '后端组',
      organsIdList: [],
      organsNameList: [],
      beginDate: CORE.timeNum(CORE.today(-30)),
      endDate: CORE.timeNum(CORE.today(30)),
      salary: 505050505.05,
      link: 'https://mi.com',
      email: 'wangwu@qq.com',
      vehicle: '浙A55555',
      selfSign: TEXT,

      // 收藏信息
      fileList: [IMG1, IMG2],
      imageList: [IMG1, IMG2],
      audioList: [VIDEO],
      videoList: [VIDEO],

      createTime: 0,
      updateTime: 0,
    },

    // —————————————————————————————— 空白 —————————————————————————————— //

    {
      id: '0',
      tenantNo: 1,

      // 基本信息
      name: '',
      phone: '',
      idType: 0,
      idNo: '',
      birth: '',
      gender: 0,
      age: 0,
      eduList: [],
      province: '',
      city: '',
      area: '',
      addr: '',

      // 账号信息
      photo: '',
      account: 'admin',
      password: '',
      status: 2,
      activeTime: 0,
      expireTime: 0,
      roleId: '000000',
      roleName: '被删的角色',
      rolesIdList: [],
      rolesNameList: [],

      // 工作信息
      organIdsList: ['111', '111111', '111111444'],
      organId: '000000',
      organName: '被删的部门',
      organsIdList: [],
      organsNameList: [],
      beginDate: 0,
      endDate: 0,
      salary: 0,
      link: '',
      email: '',
      vehicle: '',
      selfSign: '',

      // 收藏信息
      fileList: [],
      imageList: [],
      audioList: [],
      videoList: [],

      createTime: 0,
      updateTime: 0,
    },
  ],

  /**
   * 角色 (14 个)
   */
  ROLE: Array.from('0123456789abcd').map((_, i) => {
    const index = i + 1
    const id = `0${index}`.slice(-2)
    return {
      id: `${id}${id}${id}`,
      tenantNo: 1,
      roleName: `角色${CORE.numCN(index)}`,
      roleType: index,
      roleTypesList: [index, index % 14 + 1],
      remark: `${CORE.numCN(index)}个菜单`,
      status: i < 10 ? 1 : 2,
      createTime: Date.now() - 86400000 * (14 - i),
    }
  }),

  /**
   * 组织树
   */
  ORGAN: [
    {
      id: '111',
      organName: '公司总部',
      children: [
        {
          id: '111111',
          organName: '研发中心',
          children: [
            { id: '111111111', organName: '架构组' },
            { id: '111111222', organName: '前端组' },
            { id: '111111333', organName: '后端组' },
            { id: '111111444', organName: '已解散部门', status: 2 },
          ],
        },
        {
          id: '111222',
          organName: '销售中心',
          isLeaf: true,
          children: [
            { id: '111222111', organName: '华东区' },
            { id: '111222222', organName: '华南区' },
            { id: '111222333', organName: '华北区' },
            { id: '111222444', organName: '此地无银三百两，人傻钱多速来区', status: 2 },
          ],
        },
      ],
    },

    { id: '444', organName: '已注销公司', status: 2 },

    { id: '4441', organName: '已注销公司一', status: 2 },

    { id: '4442', organName: '已注销公司二', status: 2 },

    { id: '4443', organName: '已注销公司三', status: 2 },

    { id: '4444', organName: '已注销公司四', status: 2 },

    { id: '4445', organName: '已注销公司五', status: 2 },

    { id: '4446', organName: '已注销公司六', status: 2 },

    { id: '4447', organName: '已注销公司七', status: 2 },

    { id: '4448', organName: '已注销公司八', status: 2 },

    { id: '4449', organName: '已注销公司九', status: 2 },

    { id: '4440', organName: '已注销公司十', status: 2 },
  ],
}
